home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mathstud.zip / QR.M < prev    next >
Text File  |  1994-01-23  |  311b  |  17 lines

  1. function [Q,R,E]=qr(x)
  2. % [Q,R,E]=qr(x)
  3. % qr decomposition
  4.  
  5. %       S.Halevy 7/31/92
  6. %       Copyright (c) 1992 by the MathWizards
  7.  
  8. if nargout > 2
  9.    %disp('WARNING: MathViews QR is only partially implemented')
  10.    %pause
  11.    [Q,R,E]= _qr(x);
  12.    R=triu(R);
  13. else
  14.    [Q,R]= _qr(x);
  15.    R=triu(R);
  16. end
  17.